AllMixesMusicThe Big Bang TheoryHair careBakingCooking showsComediesJavaScriptNursingPlaylistsSelf-confidenceClothingReggaeSalesFemininitySoul MusicRecently uploadedLiveWatchedNew to you
Videos that you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.
If playback doesn't begin shortly, try restarting your device.
0:00 / 0:00•Live
0:00
0:00
Switch camera
Share
An error occurred while retrieving sharing information. Please try again later.
Suggested: Build a Notes App with React.js (for Beginners)
Watch Later
Share
Copy link
Tap to unmute
If playback doesn't begin shortly, try restarting your device.
Step 2 (Add final URL to package.json)
3:31
15:42
You're signed out
Videos that you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.
In this short video, we will use the awesome GitHub Pages feature to deploy our React.js app for free. You can even add a custom domain later! This technique would also work for other static websites too. Hope you enjoy the video and find it useful!
----------------------------------------------------------
⌨️ Commands Used
----------------------------------------------------------
Step 1
▶️ git remote add origin [YOUR REPO LINK]
▶️ git add -A
▶️ git commit -m "Initial commit"
▶️ git push -u origin main
Step 2
"homepage": "https://[USERNAME].github.io/[YOUR REPO NAME]",
Step 3
▶️ npm install gh-pages --save-dev
Step 4
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
▶️ npm run deploy
----------------------------------------------------------
⏰ Timestamps
----------------------------------------------------------
0:00 Introduction
0:25 Step 1 (Get your React app on GitHub)
2:11 Step 2 (Add final URL to package.json)
3:33 Step 3 (Add gh-pages npm package)
4:06 Step 4 (Create deploy scripts and deploy!)
----------------------------------------------------------
📚 Resources
----------------------------------------------------------
Editor (Visual Studio Code): https://code.visualstudio.com/
Web Browser (Firefox Developer Edition): https://www.mozilla.org/en-GB/firefox...
Terminal (iTerm, Mac only): https://iterm2.com/
MDN (where I reference JavaScript documentation): https://developer.mozilla.org/en-US/d...
----------------------------------------------------------
🔗 My Links
----------------------------------------------------------
GitHub: https://github.com/jrgrimshaw/
Instagram: https://instagram.com/jrgrimshaw
LinkedIn: https://linkedin.com/in/jrgrimshaw
Personal site: https://jgrimshaw.com#jamesgrimshaw#react
Show lessShow more
AllFrom your searchReact routersGitNode.jsRelatedWatched